package com.springSecurity.test.Utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class PasswordEncoderUtils {
    public static String BCryptEncode(String password)
    {
        return  new BCryptPasswordEncoder().encode(password);
    }
    public static boolean BCryptMatch(String password,String encodePassword){
        return  new BCryptPasswordEncoder().matches(password, encodePassword);
    }

    public static void main(String[] args) {
        String s = BCryptEncode("123456");
        System.out.println(s);
        System.out.println(BCryptMatch("123456",s));
    }
}
